﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>

<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {
        ReportViewer1.AsyncRendering = false;
    }
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Отчеты <%:ViewBag.devName %></title>
    <link href="../../Content/aspxReport.css" rel="stylesheet" type="text/css" />
</head>
<body style="height: 1257px; width: 1020px;">
<div class="title">
    <h2>Отчеты для устройства &#171;<%:ViewBag.devName %>&#187;</h2>
</div>
    <div class="report">
        <form runat="server" style="height: 1006px">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <div class="reportTitle">
        Отчет по TCP протоколам
        </div>
        <rsweb:ReportViewer ID="ReportViewer1" runat="server" 
            Font-Names="Verdana" Font-Size="8pt" InteractiveDeviceInfos="(Коллекция)" 
            WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt" Width="663px" AsyncRendering="False">
            <LocalReport ReportPath="Views\Report\TCPReport.rdlc">
                <DataSources>
                    <rsweb:ReportDataSource DataSourceId="TCPRequest" Name="TCPDataSet" />
                </DataSources>
            </LocalReport>
        </rsweb:ReportViewer>
        <asp:SqlDataSource ID="TCPRequest" runat="server" 
            ConnectionString="<%$ ConnectionStrings:Domain.Properties.Settings.NetworkMonitorConnectionString %>" 
            SelectCommand="SELECT TOP 50 [ip], [port], [status], [info], [date], [deviceName] FROM [TCPResult] WHERE ([deviceName] = @deviceName) ORDER BY [date] DESC">
            <SelectParameters>
                <asp:QueryStringParameter Name="deviceName" QueryStringField="devName" 
                    Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
        <div class="reportTitle">
        Отчет по ЭХО протоколу
        </div>
        <rsweb:ReportViewer ID="ReportViewer2" runat="server" 
            Font-Names="Verdana" Font-Size="8pt" InteractiveDeviceInfos="(Коллекция)" 
            WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt" Width="665px" 
            AsyncRendering="False">
            <LocalReport ReportPath="Views\Report\EchoReport.rdlc">
                <DataSources>
                    <rsweb:ReportDataSource DataSourceId="EchoRequest" Name="EchoDataSet" />
                </DataSources>
            </LocalReport>
        </rsweb:ReportViewer>
        
        
        <asp:SqlDataSource ID="EchoRequest" runat="server" 
            ConnectionString="<%$ ConnectionStrings:Domain.Properties.Settings.NetworkMonitorConnectionString %>" 
            SelectCommand="SELECT TOP 50 [ip], [status], [rtt], [date], [deviceName] FROM [EchoResult] WHERE ([deviceName] = @deviceName) ORDER BY [date] DESC">
            <SelectParameters>
                <asp:QueryStringParameter Name="deviceName" QueryStringField="devName" 
                    Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
        
        
        </form>
        
    </div>
    
</body>
</html>
